package org.xiao;


import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class ObjectReader1 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        String path = "D:\\study\\IO\\IOstudy\\src\\main\\resources\\test2.txt";
//        FileOutputStream os = new FileOutputStream(to);
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("D:\\study\\IO\\IOstudy\\src\\main\\resources\\aft.txt") {});
//        ObjectOutputStream oos = new ObjectOutputStream(os);
//        Stu stu = new Stu();
//        stu.setId(111);
//        stu.setName("小米");
//        oos.writeObject(stu);
//        oos.close();
//
//        Object o = ois.readObject();
//        System.out.println(o);
//        ois.close();
    }
}
